Fish biodiversity in Marine World Heritage Sites
This notebook explores fish diversity in Marine World Heritage Sites using OBIS data.
Fish species in WoRMS
[todo]
Fish data in OBIS
library(robis)
library(knitr)
if (!file.exists("checklist.Rdata")) {
cl <- checklist(dropped = "include")
cl <- cl %>%
mutate(species_fish = ifelse(superclass == "Pisces", species, NA)) %>%
mutate(species_vulnerable = ifelse(category %in% c("VU", "EN", "CR"), species, NA)) %>%
mutate(species_vulnerable_fish = ifelse(superclass == "Pisces" & category %in% c("VU", "EN", "CR"), species, NA))
save(cl, file = "checklist.Rdata")
} else {
load("checklist.Rdata")
}
cl %>%
summarize(
records = sum(records),
species = length(unique(species)),
fish = length(unique(species_fish)),
vulnerable = length(unique(species_vulnerable)),
vulnerable_fish = length(unique(species_vulnerable_fish))
) %>%
kable(format.args = list(big.mark = ","))| records | species | fish | vulnerable | vulnerable_fish |
|---|---|---|---|---|
| 76,542,439 | 153,438 | 24,523 | 1,910 | 1,008 |
Fish data for the Marine World Heritage Sites
Fetch spatial data
First fetch the Marine World Heritage Sites shapefile from MarineRegions:
library(sf)
library(dplyr)
if (!file.exists("shape/worldheritagemarineprogramme.shp")) {
download.file("http://geo.vliz.be/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=MarineRegions:worldheritagemarineprogramme&outputformat=SHAPE-ZIP", "shape.zip")
unzip("shape.zip", exdir = "shape")
}
shapes <- st_read("shape/worldheritagemarineprogramme.shp") %>%
select(full_name, country, geometry) %>%
mutate(full_name = iconv(full_name, "latin1", "UTF-8"))## Reading layer `worldheritagemarineprogramme' from data source `/Users/pieter/Desktop/notebook-mwhs/shape/worldheritagemarineprogramme.shp' using driver `ESRI Shapefile'
## Simple feature collection with 129 features and 15 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -180 ymin: -55.00039 xmax: 180 ymax: 71.80583
## geographic CRS: WGS 84
Let’s create a map.